# name : proc power survival, for N given analysis time
# key : power.survival.n.given.time
# contributor: Shuguang Sun
# --
ods output output=${99:mod}_desgin;
proc power;
   * Lakatos (1988) and Cantor, Based on Markov Chain;
   * power vs `expected` number of events, given analysis time;
   twosamplesurvival test = logrank
      curve("Standard")=${1:med_soc}:0.5,
      /* curve("Proposed")=${2:med_trt}:0.5 */
      refsurvival="Standard"
      hazardratio=${3:0.7}
      accrualtime=${4:12} followuptime=${5:12}
      /* Group 1 is reference group */
      groupweights=(1 1)
      grouplossexphazards=(${6|0.00427,0.00878,0.013543|} $6)
      nsubinterval=12
      sides=1 alpha=${7:0.025} power=${8:0.9}
      ${9:$$(yas-choose-value '("eventtotal=.", "ntotal=.", "accrualratetotal=.", "npergroup=."))}
      run;
run;